pp108 : Column Object Property

Column Object Property


Column object is an object that has the combined main properties of a column. It combines the properties of the data, the HTML, and the status of the column.

Properties of the Column Object

Property Description
businessObject Refers to XML node of the businessObject associated with the column.
rowData Refers to the XML node that forms the basis for data in the column.


Methods of the Column Object

Method Description
addEvent(event, handlerString, zoomUrl, zoomField )

Adds an event listener to the specified event. This listener will be called when the event fires.

  • event: Required. String that denotes the type of event. Possible values areonbeforedatabind,onblur,oncalendarselect,onchange,onfocus, andonzoom.
  • handlerString: Required. String that denotes the code to be executed when the event is fired.
  • zoomUrl: Optional string that denotes the URL of the page to be displayed when a user zooms on a field. This is applicable in case of theonzoomevent.
  • zoomField: Optional string that denotes the zoom field of the page that is displayed when a user zooms on the field. This is applicable in case of theonzoomevent.
getHeader()

Retrieves the header object of the corresponding column. The following methods are available for the header object.

  • getValue(): Retrieves the value of the header's label.
  • setValue(value): Sets the specified value as the header's label.
  • getTitle(): Retrieves the value of the header's tooltip.
  • setTitle(title): Sets the specified value as the header's tooltip.
getFooter()

Retrieves the footer object of the corresponding column. The following methods are available for the footer object.

  • getValue(): Retrieves the footer value.
  • setValue(value): Sets the specified value as the footer label.
setWidth(width) Integer that sets the width of the column.
hide() Hides the specified column.
freeze() Freezes the specified column.
isFrozen() Boolean. Denotes if the column is frozen. Is set astrue, if frozen.
isHidden() Boolean. Denotes if the column in hidden. Is set astrue, if the column is hidden.
move(insertBeforeColumn)

Moves the column to reposition it.

  • insertBeforeColumn: Optional. Refers to the identifier of the column. Values can be string (id of the column) or integer (column index, where the index of the first column is 0).
remove() Removes the specified column.
setFieldType(fieldType, misc1, misc2)

Sets the field type for the column.

  • fieldType: Possible values are input (default), output, password, textarea, checkbox, image, and dropdown.
  • misc1: Optional string. Its usage depends on thefieldTypevalues described below.input: n/a output: n/a password: n/a textarea: n/a checkbox: Required. Is set as 1 or true, for the true value of the data bound. image: Optional. Boolean that denotes whether the image must display as a thumbnail. Default value is false. dropdown: Required. Refers to the ID of the drop-down field.
  • misc2: Optional string. Its usage depends on thefieldtypevalues described below.input: n/a output: n/a password: n/a textarea: n/a checkbox: Required. Is set as 0 or false, for the false value of bound data. image: Optional. String that denotes the size of icons in a Column. Possible values are:small: Default. Size of column icons is set to small. mid: Size of column icons is set to medium. big: Size of column icons is set to big. dropdown: n/a
show() Displays the hidden column .
sort(order)

Sorts a column.

  • order: Optional. Refers to the sorting order. Possible values areascending(default) ordescending.
unfreeze() Unfreezes the specified column.


See Also


xgrid, cell object, row object, xpathBusinessObject